#ifndef BOARD_H
#define BOARD_H

#include <wx/wxprec.h>

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

//(*Headers(board)
#include <wx/button.h>
#include <wx/frame.h>
#include <wx/sizer.h>
//*)

#include "info.h"
#include "protocol.h"

class Connection;

class board: public wxFrame
{
	public:

		board(wxWindow* parent, int, Connection*, wxWindowID id = -1);
		virtual ~board();

		//(*Identifiers(board)
		static const long ID_BUTTON1;
		static const long ID_BUTTON2;
		static const long ID_BUTTON3;
		static const long ID_BUTTON4;
		static const long ID_BUTTON5;
		static const long ID_BUTTON6;
		static const long ID_BUTTON7;
		static const long ID_BUTTON8;
		static const long ID_BUTTON9;
		//*)
		int getRoomID();
        void move(CODE cmd);
        void gameWon(int xoro);

	protected:

		//(*Handlers(board)
		void OnClose(wxCloseEvent& event);
		void OnButtonULClick(wxCommandEvent& event);
		void OnButtonUClick(wxCommandEvent& event);
		void OnButtonURClick(wxCommandEvent& event);
		void OnButtonLClick(wxCommandEvent& event);
		void OnButtonCClick(wxCommandEvent& event);
		void OnButtonRClick(wxCommandEvent& event);
		void OnButtonLLClick(wxCommandEvent& event);
		void L(wxCommandEvent& event);
		void OnButtonLRClick(wxCommandEvent& event);
		//*)

		//(*Declarations(board)
		wxGridSizer* GridSizer1;
		wxButton* Button1;
		wxButton* Button2;
		wxButton* Button3;
		wxButton* Button4;
		wxButton* Button5;
		wxButton* Button6;
		wxButton* Button7;
		wxButton* Button8;
		wxButton* Button9;
		//*)

	private:
        Info* scoreboard;
        Connection* server;
        int roomid;

		DECLARE_EVENT_TABLE()
};

#endif
